Data Processing Method, Communications Device, and Communications System

ABSTRACT

A data processing method, a communications device, and a communications system, where in a process of transmitting a packet service, a code block stream carrying the packet service is first obtained, then, rate adaptation is performed on the obtained code block stream, and finally, the rate-adapted code block stream is mapped to an optical channel payload unit (OPU) signal. Compared with a mapping manner in which a Generic Framing Procedure (GFP) is used, the data processing method, the communications device, and the communications system feature low processing complexity and/or high bandwidth utilization.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Patent ApplicationNo. PCT/CN2016/084997 filed on Jun. 6, 2016, which claims priority toChinese Patent Application No. 201510310590.2 filed on Jun. 8, 2015. Thedisclosures of the aforementioned applications are hereby incorporatedby reference in their entireties.

TECHNICAL FIELD

The present disclosure relates to the field of communicationstechnologies, and in particular, to a data processing method, acommunications device, and a communications system.

BACKGROUND

Currently, as a core technology of a transport network, an opticaltransport network (OTN) technology includes electrical-layer andoptical-layer technical specifications, and features diverse operation,administration, and maintenance (OAM) functions, a powerful tandemconnection monitoring (TCM) capability, and a powerful out-of-bandforward error correction (FEC) capability. This can implement flexiblescheduling and management for large-capacity services.

As shown in FIG. 1, an OTN frame is a 4080×4 modular structure, andincludes a frame alignment signal (FAS), providing a framesynchronization function. OTUk OH is an overhead byte of an opticalchannel transport unit (OTU), and provides a network management functionat an OTU level. ODUk OH is an overhead byte of an optical channel dataunit (ODU), and provides maintenance and operation functions. OPUk OH isan overhead byte of an optical channel payload unit (OPU), and providesa customer signal adaptation function. OPUk payload is the OPU, andprovides a customer signal bearer function. FEC is a FEC byte, andprovides error detection and error correction functions. The coefficientk represents a supported bit rate and different types of OPUks, ODUks,and OTUks. If k=1, it indicates that a bit rate level is 2.5 gigabitsper second (Gbit/s), if k=2, it indicates that a bit rate level is 10Gbit/s, if k=3, it indicates that a bit rate level is 40 Gbit/s, if k=4,it indicates that a bit rate level is 100 Gbit/s, and if k=flex, itindicates that a bit rate is arbitrary.

An OTN may be used to transparently transmit various communicationsservices. A packet service is a typical one in the variouscommunications services. In the packet service, a service is transmittedusing a packet. A length of each packet is variable, and an idlecharacter usually exists between adjacent packets. A quantity of idlecharacters is also variable.

Currently, for transmission of a packet service, the OTN usually uses aGeneric Framing Procedure (GFP) mapping manner. In this manner, thepacket service is first encapsulated into a GFP frame, and then the GFPframe is mapped to an OPU payload area. As a rate increases, problemsinherent in this mapping manner gradually emerge: (1) A byte-granularitymapping manner is used in the GFP. As the rate rapidly increases, if abyte granularity is still used for GFP mapping encapsulation,implementation complexity is greatly increased. (2) Because a GFP framegenerated during GFP mapping processing has an unfixed frame length, aposition in which a GFP frame header may appear needs to be identifiedmore frequently. In addition, data in each clock cycle is differentlyprocessed. This further increases complexity of customer service mappingprocessing performed at a high rate and a large bit width. (3) Because aGFP core head (core frame header), a Payload head (payload frameheader), a frame check sequence (FCS), and the like are added to the GFPframe generated during the GFP mapping processing, bandwidth utilizationis lowered.

SUMMARY

In view of this, embodiments of the present disclosure provide a dataprocessing method, a communications device, and a communications system.

According to a first aspect, an embodiment of the present disclosureprovides a data processing method, where the method is applied to anOTN, and the method includes obtaining a code block stream that carriesa packet service, performing rate adaptation on the obtained code blockstream, and mapping the rate-adapted code block stream to an OPU signal.

With reference to the first aspect, in a first possible implementation,performing rate adaptation on the obtained code block stream includes atleast one of inserting an idle code block into the obtained code blockstream, or deleting some or all of idle code blocks in the obtained codeblock stream, where the idle code block is a control code block thatincludes an idle code block type indicator, and the idle code block doesnot carry the packet service, where a quantity of to-be-mapped codeblocks in the rate-adapted code block stream within each OPU frameperiod is equal to a preset value C_(m). Preferably, C_(m) is equal to amaximum integer value of a quantity of code blocks that can be carriedby an OPU payload area.

With reference to any one of the first aspect or the first possibleimplementation of the first aspect, in a second possible implementation,mapping the rate-adapted code block stream to an OPU signal includesmapping C_(m) code blocks to one OPU frame within each OPU frame period,and inserting C_(m) into an overhead of the OPU frame.

With reference to any one of the first aspect, the first or the secondpossible implementation of the first aspect, in a third possibleimplementation, mapping the rate-adapted code block stream to an OPUsignal includes mapping the rate-adapted code block stream to the OPUsignal according to a fixed mapping pattern.

With reference to any one of the first aspect, or the first or thesecond or the third possible implementation of the first aspect, in afourth possible implementation, inserting an idle code block into theobtained code block stream includes inserting an idle code block betweena T code block and an S code block that are adjacent in the obtainedcode block stream, where the T code block indicates a code block thatincludes a packet service end character, and the S code block indicatesa code block that includes a packet service start character.

With reference to any one of the first aspect, or the first to thefourth possible implementation of the first aspect, in a fifth possibleimplementation, the obtained code block stream is a 64B/66B code blockstream, and a code block type field of the idle code block is 0x1e.Furthermore, “X”B/“Y”B indicates encoding X-bit data to be transmittedas Y-bit entity and in an embodiment term “bits” represented with B.

With reference to any one of the first aspect, the first to the thirdpossible implementations of the first aspect, in a sixth possibleimplementation, the obtained code block stream is a 64B/66B code blockstream, and a code block type field of the idle code block is 0x88,where inserting an idle code block into the obtained code block streamincludes inserting an idle code block into a first position of theobtained code block stream, where the first position is any position inthe obtained code block stream.

With reference to any one of the first aspect, or the first to the sixthpossible implementation of the first aspect, in a seventh possibleimplementation, the idle code block further carries at least one of apacket service port number or a packet service type indicator.

With reference to any one of the first aspect, or the first to theseventh possible implementations of the first aspect, in an eighthpossible implementation, performing rate adaptation on the obtained codeblock stream includes deleting some or all of idle code blocks in theobtained code block stream, where the idle code block is a control codeblock that includes an idle code block type indicator, and the idle codeblock does not carry the packet service.

With reference to any one of the first aspect, or the first to theeighth possible implementations of the first aspect, in a ninth possibleimplementation, performing rate adaptation on the obtained code blockstream includes performing code block conversion on the code blockstream into which an idle code block is inserted or from which an idlecode block is deleted, where the code block conversion includescompressing a 2-bit synchronization header of each code block into 1bit, where when the 1 bit is filled with 1, it indicates that acorresponding code block is a control code block, and when the 1 bit isfilled with 0, it indicates that a corresponding code block is a datacode block.

With reference to any one of the first aspect, or the first to the ninthpossible implementations of the first aspect, in a tenth possibleimplementation, mapping the rate-adapted code block stream to an OPUsignal includes filling 0x1D in a payload type (PT) indicator field ofthe OPU signal in order to indicate that the mapping manner is a mannerin which the rate-adapted code block stream is directly mapped.

With reference to any one of the first aspect, or the first to the tenthpossible implementations of the first aspect, in an eleventh possibleimplementation, the OPU is a flexible OPU (OPUflex).

According to a second aspect, an embodiment of the present disclosureprovides a data processing method, where the method is applied to anOTN, and the method includes receiving an OPU signal, performingdemapping process on the OPU signal, deleting an idle code block in thecode block stream obtained by means of the demapping process, where theidle code block is a control code block that includes an idle code blocktype indicator, and the idle code block does not carry a packet service,and obtaining the packet service from the code block stream from whichthe idle code block is deleted.

With reference to the second aspect, in a first possible implementation,performing demapping process on the OPU signal includes performing thedemapping process on the OPU signal according to a preset value C_(m),where C_(m) is a quantity of code blocks carried in an OPU frame.

With reference to the first aspect or the first possible implementationof the second aspect, in a second possible implementation, performingdemapping process on the OPU signal includes performing the demappingprocess on the OPU signal according to a fixed mapping pattern.

With reference to any one of the second aspect, or the first and thesecond possible implementations of the second aspect, in a thirdpossible implementation, deleting an idle code block in the code blockstream obtained by means of the demapping process includes identifyingthe idle code block type indicator, and deleting a code block thatincludes the idle code block type indicator.

With reference to any one of second aspect, or the first to the thirdpossible implementations of the second aspect, in a fourth possibleimplementation, the idle code block further carries at least one of apacket service port number or a packet service type indicator.

With reference to any one of the second aspect, or the first to thefourth possible implementations of the second aspect, in a fifthpossible implementation, performing demapping process on the OPU signalincludes demapping a 65B code block stream from the OPU signal, andconverting a synchronization header of each 65B code block from 1 bitinto 2 bits to obtain a 64B/66B code block.

According to a third aspect, a communications device is provided, wherethe communications device includes a processing component configured toobtain a code block stream that carries a packet service, perform rateadaptation on the obtained code block stream, and map the rate-adaptedcode block stream to an OPU signal.

With reference to the third aspect, in a first possible implementation,the processing component includes an obtaining unit, a rate adaptationunit, and a mapping unit, where the obtaining unit is configured toobtain the code block stream that carries the packet service, the rateadaptation unit is configured to perform the rate adaptation on theobtained code block stream, and the mapping unit is configured to mapthe rate-adapted code block stream to the OPU signal.

With reference to the third aspect, or the first possible implementationof the third aspect, in a second possible implementation, the performingrate adaptation on the obtained code block stream includes at least oneof inserting an idle code block into the obtained code block stream, ordeleting some or all of idle code blocks in the obtained code blockstream, where the idle code block is a control code block that includesan idle code block type indicator, and the idle code block does notcarry the packet service, where a quantity of to-be-mapped code blocksin the rate-adapted code block stream within each OPU frame period isequal to a preset value C_(m). Preferably, C_(m) is equal to a maximuminteger value of a quantity of code blocks that can be carried by an OPUpayload area.

With reference to any one of the third aspect, or the first and thesecond possible implementations of the third aspect, in a third possibleimplementation, mapping the rate-adapted code block stream to an OPUsignal includes mapping C_(m) code blocks to one OPU frame within eachOPU frame period according to a fixed mapping pattern, and insertingC_(m) into an overhead of the OPU frame.

With reference to any one of the third aspect, or the first to the thirdpossible implementations of the third aspect, in a fourth possibleimplementation, the obtained code block stream is a 64B/66B code blockstream, and a code block type field of the idle code block is 0x88,where inserting an idle code block into the obtained code block streamincludes inserting an idle code block into a first position of theobtained code block stream, where the first position is any position inthe obtained code block stream.

With reference to the third aspect, or the first to the fourth possibleimplementations of the third aspect, in a fifth possible implementation,performing rate adaptation on the obtained code block stream includesdeleting some or all of idle code blocks in the obtained code blockstream, where the idle code block is a control code block that includesan idle code block type indicator, and the idle code block does notcarry the packet service.

With reference to any one of the third aspect, or the first to the fifthpossible implementations of the third aspect, in a sixth possibleimplementation, performing rate adaptation on the obtained code blockstream includes performing code block conversion on the code blockstream into which an idle code block is inserted or from which an idlecode block is deleted, where the code block conversion includescompressing a 2-bit synchronization header of each code block into 1bit, where when the 1 bit is filled with 1, it indicates that acorresponding code block is a control code block, and when the 1 bit isfilled with 0, it indicates that a corresponding code block is a datacode block.

With reference to the third aspect, or the first to the sixth possibleimplementations of the third aspect, in a seventh possibleimplementation, mapping the rate-adapted code block stream to an OPUsignal includes filling 0x1D in a PT indicator field of the OPU signalin order to indicate that a mapping manner is a manner in which therate-adapted code block stream is directly mapped.

According to a fourth aspect, a communications device is provided, wherethe communications device includes a processing component configured toreceive an OPU signal, perform demapping process on the OPU signal,delete an idle code block in the code block stream obtained by means ofthe demapping process, where the idle code block is a control code blockthat includes an idle code block type indicator, and the idle code blockdoes not carry a packet service, and obtain the packet service from thecode block stream from which the idle code block is deleted.

With reference to the fourth aspect, the processing component includes areceiving unit, a demapping unit, a deletion unit, and an obtainingunit, where the receiving unit is configured to receive the OPU signal,the demapping unit is configured to perform the demapping processing onthe OPU signal, the deletion unit is configured to delete the idle codeblock in the code block stream obtained by means of the demappingprocessing, and the obtaining unit is configured to obtain a packetservice from the code block stream from which the idle code block isdeleted.

With reference to the fourth aspect, or the first possibleimplementation of the fourth aspect, performing demapping process on theOPU signal includes performing the demapping process on the OPU signalaccording to a fixed mapping pattern and a preset value C_(m), whereC_(m) is a quantity of code blocks carried in an OPU frame.

With reference to any one of the fourth aspect, or the first and thesecond possible implementations of the fourth aspect, performingdemapping process on the OPU signal includes demapping a 65B code blockstream from the OPU signal, and converting a synchronization header ofeach 65B code block from 1 bit into 2 bits to obtain a 64B/66B codeblock.

According to a fifth aspect, a communications system is provided, wherethe communications system includes a first communications device and asecond communications device, where the first communications device isconfigured to obtain a code block stream that carries a packet service,perform rate adaptation on the obtained code block stream, and map therate-adapted code block stream to an OPU signal, and the secondcommunications device is configured to receive the OPU signal, performdemapping processing on the OPU signal, delete an idle code block in thecode block stream obtained by means of the demapping processing, wherethe idle code block is a control code block that includes an idle codeblock type indicator, and the idle code block does not carry the packetservice, and obtain a packet service from the code block stream fromwhich the idle code block is deleted.

Optionally, performing rate adaptation on the obtained code block streamincludes at least one of inserting an idle code block into the obtainedcode block stream, or deleting some or all of idle code blocks in theobtained code block stream, where the idle code block is a control codeblock that includes an idle code block type indicator, and the idle codeblock does not carry the packet service, where a quantity ofto-be-mapped code blocks in the rate-adapted code block stream withineach OPU frame period is equal to a preset value C_(m), mapping therate-adapted code block stream to an OPU signal includes mapping C_(m)code blocks to one OPU frame within each OPU frame period, and insertingC_(m) into an overhead of the OPU frame, and performing demappingprocess on the OPU signal includes performing the demapping process onthe OPU signal according to C_(m).

Optionally, mapping the rate-adapted code block stream to an OPU signalincludes mapping the rate-adapted code block stream to the OPU signalaccording to a fixed mapping pattern, and performing demapping processon the OPU signal includes performing the demapping process on the OPUsignal according to the fixed mapping pattern.

It may be understood that the communications system provided in thisembodiment of the present disclosure includes the communications devicesprovided in the third aspect and the fourth aspect, and performs themethods provided in the first aspect and the second aspect.

According to a sixth aspect, a computer readable medium is provided, andconfigured to store an instruction, where when being run by a computer,the instruction drives the computer to perform the methods provided inthe first aspect and the second aspect.

For the data processing method, the communications device, and thecommunications system that are provided in embodiments of the presentdisclosure, in a process of transmitting a packet service, a code blockstream that carries the packet service is first obtained. Then, rateadaptation is performed on the obtained code block stream, and finally,the rate-adapted code block stream is mapped to an OPU signal. Comparedwith a conventional mapping manner in which a GFP is used, the dataprocessing method, the communications device, and the communicationssystem that are provided in the embodiments of the present disclosurefeature low processing complexity and/or high bandwidth utilization.

BRIEF DESCRIPTION OF DRAWINGS

To describe the technical solutions in the embodiments of the presentdisclosure or in the other approaches more clearly, the followingbriefly describes the accompanying drawings required for describing theembodiments. The accompanying drawings in the following description showsome embodiments of the present disclosure, and persons of ordinaryskill in the art may still derive other drawings from these accompanyingdrawings without creative efforts.

FIG. 1 is a frame structure of an OTN frame;

FIG. 2 is a flowchart of a data processing method according to anembodiment of the present disclosure;

FIG. 3 is a schematic structural diagram of an idle code block accordingto an embodiment of the present disclosure;

FIG. 4 is a schematic structural diagram of an idle code block accordingto an embodiment of the present disclosure;

FIG. 5 is a schematic diagram of a method for deleting an idle codeblock according to an embodiment of the present disclosure;

FIG. 6 is a schematic diagram of a method for adding an idle code blockaccording to an embodiment of the present disclosure;

FIG. 7 is a schematic structural diagram of a super block according toan embodiment of the present disclosure;

FIG. 8 is a mapping pattern according to an embodiment of the presentdisclosure;

FIG. 9 is a mapping pattern according to an embodiment of the presentdisclosure;

FIG. 10 is a mapping pattern according to an embodiment of the presentdisclosure;

FIG. 11 is a mapping pattern according to an embodiment of the presentdisclosure;

FIG. 12 is a mapping pattern and a new frame structure according to anembodiment of the present disclosure; and

FIG. 13 is a flowchart of a data processing method according to anembodiment of the present disclosure.

DESCRIPTION OF EMBODIMENTS

To make the objectives, technical solutions, and advantages of theembodiments of the present disclosure clearer, the following clearlydescribes the technical solutions in the embodiments of the presentdisclosure with reference to the accompanying drawings in theembodiments of the present disclosure. The described embodiments aresome but not all of the embodiments of the present disclosure. All otherembodiments obtained by persons of ordinary skill in the art based onthe embodiments of the present disclosure without creative efforts shallfall within the protection scope of the present disclosure.

A method, an apparatus, and a system that are provided in theembodiments of the present disclosure are all based on same principlesand designs. All aspects that are described in the embodiments of thepresent disclosure and that are not in conflict with each other or thatare not parallel to each other may be mutually combined. This is notlimited in the embodiments of the present disclosure. For example, apart describes an aspect A, and another part describes an aspect B. Theaspect A and the aspect B may be combined by default, provided that theaspect A and the aspect B are not in conflict with each other, or arenot two paralleled aspects. Further, for example, an apparatus describedin the embodiments of the present disclosure may have all functionsmentioned in a method described in the embodiments of the presentdisclosure in order to implement a corresponding method. Similarly, amethod described in the embodiments of the present disclosure may beimplemented using an apparatus in the embodiments of the presentdisclosure. For a method and an apparatus, a frame structure describedin the embodiments of the present disclosure is commonly used, andmutual reference may be made.

The method, the communications device, and the communications systemthat are provided in the embodiments of the present disclosure may beapplied to the OTN field. For an OTN technology, the InternationalTelecommunication Union has already formulated a corresponding standard,for example, G.709/Y.1331 published in February, 2012. All content inthe standard is incorporated herein by reference in its entirety.

As shown in FIG. 2, an embodiment of the present disclosure provides adata processing method. The method is applied to an OTN. The methodincludes the following steps.

Step S101: Obtain a code block stream that carries a packet service.

The packet service refers to a service based on a packet transfertechnology. A length of a packet that carries a service is variable. Anidle character is included between adjacent packets. A quantity of idlecharacters is also variable. The packet service includes an InternetProtocol (IP) service, an Ethernet service, a multiprotocol labelswitching (MPLS) service, and the like. The code block stream in thisembodiment of the present disclosure refers to a data stream includingcode blocks. The code block may be an 8B/10B code block, a 64B/66B codeblock, a 64B/65B code block, a 256B/258B code block, a 256B/257B codeblock, or another code block.

An OTN device obtains a code block stream that carries a packet servicein multiple manners. For example, the OTN device may directly receive anoriginal uncoded packet service, such as a packet service from a packetservice device or a packet service board, or a service on a localnetwork of the OTN device. In this case, a code block stream thatcarries a packet service may be obtained by means of coding. Forexample, 64B/66B coding may be performed on a received packet service inorder to obtain a code block stream that carries the packet service.Optionally, the OTN device may receive a coded code block stream from atransmit end. For example, the OTN device may receive a correspondingsignal using a physical interface, and then obtain a code block streamafter processing at a physical media dependent (PMD) sublayer and aphysical medium attachment (PMA) sublayer.

Corresponding to the foregoing descriptions, optionally, the method mayfurther include receiving a packet service, and coding the packetservice in order to obtain the code block stream that carries the packetservice. Optionally, the method may also include receiving a bit streamthat carries a packet service, performing code block synchronizationheader searching on the bit stream in order to obtain a code blockboundary in the bit stream, and performing descrambling processing on acode block data part in the bit stream in order to obtain the code blockstream that carries the packet service.

Step S103: Perform rate adaptation on the obtained code block stream.

The rate adaptation performed on the code block stream in thisembodiment of the present disclosure may be increasing a code blockstream rate, or may be decreasing a code block stream rate, or mayfurther be using a combination thereof (for example, increasing a codeblock stream rate and decreasing a code block stream rate respectivelyin different time periods). Increasing a code block stream rate isimplemented by adding an idle code block into a code block stream, anddecreasing a code block stream rate is implemented by deleting an idlecode block originally existing in a code block stream. This embodimentof the present disclosure subsequently describes in detail how to add ordelete an idle code block.

Step S105: Map the rate-adapted code block stream to an OPU signal.

Optionally, for specific mapping, a method in the other approaches maybe used, or another method described in this embodiment of the presentdisclosure may be used.

For example, optionally, performing rate adaptation on the obtained codeblock stream includes at least one of inserting an idle code block intothe obtained code block stream, or deleting some or all of idle codeblocks in the obtained code block stream. The idle code block is acontrol code block that includes an idle code block type indicator, andthe idle code block does not carry the packet service. A quantity ofto-be-mapped code blocks in the rate-adapted code block stream withineach OPU frame period is equal to a preset value C_(m). Preferably,C_(m) is equal to a maximum integer value of a quantity of code blocksthat can be carried by an OPU payload area. Optionally, because C_(m) ispreset, the C_(m) value does not need to be transmitted to a receiveend, that is, the C_(m) value does not need to be inserted into anoverhead.

Optionally, mapping the rate-adapted code block stream to an OPU signalincludes mapping C_(m) code blocks to one OPU frame within each OPUframe period, and inserting C_(m) into an overhead of the OPU frame.

Optionally, mapping the rate-adapted code block stream to an OPU signalincludes mapping C_(m) code blocks to one OPU frame within each OPUframe period if the preset value C_(m) is equal to the maximum integervalue of the quantity of the code blocks that can be carried by the OPUpayload area. Because C_(m) is a known size of the OPU payload area,C_(m) information may not be inserted into an overhead of the OPU frame.

Optionally, mapping the rate-adapted code block stream to an OPU signalincludes mapping the rate-adapted code block stream to the OPU signalaccording to a fixed mapping pattern.

Optionally, inserting an idle code block into the obtained code blockstream includes inserting an idle code block between a T code block andan S code block that are adjacent in the obtained code block stream,where the T code block indicates a code block that includes a packetservice end character, and the S code block indicates a code block thatincludes a packet service start character.

Optionally, the obtained code block stream is a 64B/66B code blockstream, and a code block type field of the idle code block is 0x1e.

Optionally, the obtained code block stream is a 64B/66B code blockstream, and a code block type field of the idle code block is 0x88, andinserting an idle code block into the obtained code block streamincludes inserting an idle code block into a first position of theobtained code block stream, where the first position is any position inthe obtained code block stream.

Optionally, the idle code block further carries at least one of a packetservice port number or a packet service type indicator.

Optionally, performing rate adaptation on the obtained code block streamincludes deleting some or all of idle code blocks in the obtained codeblock stream, where the idle code block is a control code block thatincludes an idle code block type indicator, and the idle code block doesnot carry the packet service.

Optionally, performing rate adaptation on the obtained code block streamincludes performing code block conversion on the code block stream intowhich an idle code block is inserted or from which an idle code block isdeleted.

The code block conversion includes compressing a 2-bit synchronizationheader of each code block into 1 bit, where when the 1 bit is filledwith 1, it indicates that a corresponding code block is a control codeblock, and when the 1 bit is filled with 0, it indicates that acorresponding code block is a data code block.

Optionally, mapping the rate-adapted code block stream to an OPU signalincludes filling 0x1D in a PT indicator field of the OPU signal in orderto indicate that a mapping manner is a manner in which the rate-adaptedcode block stream is directly mapped.

Optionally, the OPU in this application may be OPU0, OPU1, OPU2, OPU3,OPU4, or an OPUflex. When OPUflex is used as an example in the followingspecific descriptions, another OPU type is also applicable.

The following describes how to implement this embodiment of the presentdisclosure in an OTN with reference to the foregoing generaldescriptions and corresponding implementations. The followingdescriptions and explanations are closely combined with the foregoinggeneral descriptions, and for corresponding details, refer to theforegoing general descriptions.

Code Block Stream Rate Adaptation:

After a code block stream that carries a packet service is obtained, acode block in the corresponding code block stream needs to be identifiedfirst. Using a 64B/66B code block as an example (another code block isused by analogy), 2-bit synchronization header detection may beperformed on a code block stream in order to perform 64B/66B code blocksynchronization header searching processing, thereby determining a64B/66B code block boundary. For the 64B/66B code block, if a 2-bitsynchronization header is “10”, the code block is a control code block,or if the 2-bit synchronization header is “01”, the code block is a datacode block. For the 64B/66B control code block, block type informationof each code block is further checked in order to determine a type ofeach 64B/66B control code block. A pattern of an idle code block isshown in FIG. 3. The first two bits are 10. The 3^(rd) bit to the10^(th) bit are code block type indicator fields that are used toindicate specific control code block types. The idle code block isfilled with 0x1e. The 11^(th) bit to the 66^(th) bit are filled withfixed values.

After each code block is identified, an idle code block may be added toor deleted from the identified 64B/66B code block stream in order toensure that a data stream rate obtained after adding or deleting an idlecode block is less than an OPU payload area rate. When a rate of areceived 64B/66B code block stream is greater than the OPU payload arearate, an idle code block is deleted from the 64B/66B code block stream.When the rate of the received 64B/66B code block stream is less than theOPU payload area rate, an idle code block is inserted into the 64B/66Bcode block stream. A specific implementation may be used. For example,when customer data size in a cache is less than a preset value (forexample, a half of a cache waterline of first-in, first-out (FIFO) usedfor caching), an idle code block is inserted into the 64B/66B code blockstream, or when the customer data size in the cache is higher than thepreset value, an idle code block is deleted from the 64B/66B code blockstream.

Optionally, if mapping processing is performed by automaticallygenerating a C_(m) value according to a cache waterline in a subsequentmapping step, all identified idle code blocks may be deleted from a datastream in this step, and only a 64B/66B code block stream correspondingto customer service valid data is saved. In this manner, a minimumcustomer service rate is used to match a rate of an OPU payload areabearer container.

Optionally, if mapping processing is performed by setting a fixed C_(m)value in subsequent mapping, the foregoing method may still be used.Idle code block adding or deleting processing is performed according toa customer data situation in a cache.

For the foregoing case of inserting an idle code block, a speciallydefined code block of a special type may be used as an idle code blockto be inserted. In this case, the receive end needs to delete the codeblock of this special type after performing demapping. The method forperforming mapping by adding or deleting an idle code block provided inthis embodiment of the present disclosure may be referred to as an idlemapping procedure (IMP), or may be referred to as a stuff mappingprocedure (SMP).

To add an idle code block into the 64B/66B code block streamcorresponding to the customer service valid data, optionally, an O codeblock may be added to serve as an idle code block for implementation.The O code block may be inserted into any position in the code blockstream without changing an original code block. The O code block carriesan information pattern shown in FIG. 4. The information pattern includesa 2-bit synchronization header 01, and a 1-byte code block typeindicator 0x88 (which may be replaced by any other unused value from0x00 to 0xFF). The 11^(th) bit to the 66^(th) bit may be filled withfixed bytes. Optionally, one or more of the 11^(th) bit to the 66^(th)bit may be used to carry at least one of a packet service port number ora packet service type indicator. For example, the 11^(th) bit to the26^(th) bit may be used to carry the packet service port number, and/orthe 27^(th) bit to the 34^(th) bit may be used to carry the packetservice type indicator.

Optionally, an existing idle code block shown in FIG. 3 or an idle codeblock described in the previous paragraph may be used, and be insertedinto a position behind the T code block and before the S code block.

In addition, to transmit information such as the packet service portnumber and the packet service type indicator, an existing S code blockmay further be modified to an S+ code block. Further, an original S codeblock in the data stream is modified to an S+ code block. Further, threebytes behind a start character in the S code block may be used to carryand transmit the packet service port number and the packet service typeindicator. Because data carried behind the start character is generallya preamble, and the preamble is a fixed stuffing value, after obtainingthe transmitted packet service port number and the packet service typeindicator, the receive end may recover the value.

FIG. 5 schematically provides a process of deleting an idle code block.In FIG. 5, D represents a data code block, S represents an S code block,T represents a T code block, and I represents an idle code block.Optionally, only some of the idle code blocks may be deleted.

FIG. 6 schematically provides a process of adding an idle code block. InFIG. 6, D represents a data code block, S represents an S code block, Trepresents a T code block, and O represents an idle code block. InManner 1 in FIG. 6, the idle code block shown in FIG. 3 may be used, ora new idle code block shown in FIG. 4 may be used. Optionally, aquantity of to-be-inserted idle code blocks may be selected as required.In Manner 2, a new idle code block shown in FIG. 4 is preferablyselected. Optionally, a quantity of to-be-inserted idle code blocks maybe selected as required. Optionally, when a position into which an idlecode block is to be inserted may be randomly selected, and when multipleidle code blocks need to be inserted, the idle code blocks may beinserted in consecutive positions, or may be inserted in non-consecutivepositions.

Code Block Conversion Processing:

This embodiment of the present disclosure describes with emphasisspecific content about the related “code block conversion processing.”The processing step may be selected as required. The processing step maybe arranged after code block stream rate adaptation and before mapping.Alternatively, the code block conversion processing may be performedbefore the code block stream rate adaptation. Code block conversionprocessing can compress an overall code block rate. This enhancestransmission efficiency.

Generally, a code block has a 2-bit synchronization header. The 2-bitsynchronization header is used to locate each code block, and is used toindicate whether a code block is a data code block or a control codeblock. In this embodiment of the present disclosure, after each codeblock is identified, the 2-bit synchronization header may be compressedinto a 1-bit code block. At the receive end, correspondingly, acorresponding 1-bit synchronization header may be restored to 2 bits.

Using a 64B/66B code block as an example (another code block is used byanalogy), for a control code block, an original 2-bit synchronizationheader indicator “10” is compressed into a 1-bit “1”, for a data codeblock, an original 2-bit synchronization header indicator “01” iscompressed into a 1-bit “0”. The values respectively corresponding tothe data code block and the control code block may be transposed. Thisis not limited in the present disclosure.

In addition, the 64B/66B code block (another code block is used byanalogy) may further be converted into a super block. As shown in FIG.7, in this method, every eight 64B/68B code blocks form one super block(65 bytes) that includes a data field and a control field. The datafield is 64 bytes (8*8 bytes), and consists of a data part of eight64B/66B code blocks. The control field is eight bits that respectivelyindicate whether the 8*8 bytes in the data field are a 64B/66B controlcode block or a 66B data code block before being converted. 1 (or 0)indicates the 64B/66B control code block, and 0 (or 1) indicates the64B/66B data code block.

The Super Block May Include Three Types:

(1) c-data: a control super block, which is a super block includingcontrol information. A super block pattern of c-data is shown asfollows: 8*8 bytes in the first half part are a data field, and 8*1 bitsin the second half part is a control field:

SDDDDDDD+10000000, which includes a customer service frame header codeblock and is located in a super block header; and

DDDTSDDD+00001000 (example), which successively includes a customerservice frame terminate code block and a frame header code block, andmay be located in any seven positions in the super block.

(2) all-data: an all-data super block, which is DDDDDDDD+00000000.

(3) data-idle: a frame terminate super block, which is a super blockincluding frame terminate information. An idle code block represented byI needs to be added according to an actual position of a converted 66Bcustomer service frame terminate code block in the super block, and asuper block pattern is as follows:

-   -   DDDDDDDI+00000001    -   DDDDDDII+00000011    -   DDDDDIII+00000111    -   DDDDIIII+00001111    -   DDDIIIII+00011111    -   DDIIIIII+00111111    -   DIIIIIII+01111111

Mapping:

This embodiment of the present disclosure describes with emphasis how toperform mapping to an OPU payload area, that is, “mapping a code blockor a converted code block to an OPUflex payload area.”

(1) A quantity C_(m) of to-be-mapped customer service code blocks withinan OPU frame period is generated. C_(m) is less than or equal to a sizeP of the OPU payload area. Optionally, the C_(m) value may be generatedbased on a quantity T of code blocks in a current cache. A generationrule is as follows. If T is greater than the size P of the OPU payloadarea, C_(m) is equal to P, otherwise, C_(m) is equal to T. A unit of T,C_(m), and P is a code block size. In this manner, at a code blockstream rate adaptation stage, some or all of idle code blocks in thecode block stream may be deleted. Optionally, C_(m) may be apre-determined value configured. If the C_(m) value is less than orequal to the size P of the OPU payload area, C_(m)=P is preferablyselected. This manner needs to be matched with code block stream rateadaption processing, that is, during the code block stream rateadaptation processing, properly adding an idle code block or deleting anidle code block enables an overall rate of a to-be-carried code blockstream to be matched with a rate of an OPU payload area bearercontainer. That is, an idle code block is properly added or deleted suchthat a quantity of to-be-mapped code blocks within each OPU frame periodis equal to C_(m).

(2) C_(m) code blocks are mapped to the OPU payload area based on a codeblock granularity and according to a Sigma-delta algorithm, and mappingoverhead information C_(m) is added to an OPU overhead area. Optionally,the OPU payload area includes a bearer area and a fixed stuffing area.The bearer area may be used to carry an integer quantity of code blocks.The fixed stuffing area is filled with a fixed bit. It is worth notedthat for a special case in which C_(m) is equal to P, the Sigma-deltaalgorithm is not needed (certainly, the Sigma-delta algorithm may alsocontinue to be used), and the C_(m) code blocks may be directly mappedto the OPU payload area. Optionally, because C_(m) is a known size ofthe OPU payload area, the C_(m) information may be inserted into the OPUoverhead area, or may be not inserted into the OPU overhead area.

(3) Optionally, an OPU PT indicator such as 0x1D (in hexadecimal) may beadded in order to indicate that an IMP or SMP mapping method is used inthe OPU payload area to map a packet service.

Optionally, based on an existing OPU frame structure with 4 rows and3810 columns, the overhead area is the four rows of the 15^(th) and16^(th) columns, and the payload area is the four rows of 3808 columns.If mapping is performed based on a 64B/66B code block, as shown in FIG.8, the payload area is divided into 1846 blocks, and terminates of thefirst to fourth rows are separately filled with 5 padding bits(designated as FS). Based on a 64B/66B code block granularity, a 64B/66Bcode block stream is mapped to the OPU payload area according to theSigma-delta algorithm. Shadowed areas are stuffing areas. The mappingoverhead information C_(m) is placed into OPU overhead positions in thefirst to third rows of the 15^(th) and 16^(th) columns.

Optionally, if mapping is performed based on a 65B code block (aconverted code block), as shown in FIG. 9, the payload area is dividedinto 1872 blocks. Terminates of the first and third rows are separatelyfilled with 9 padding bits, and terminates of the second and fourth rowsare separately filled with 14 padding bits. Based on a 65B code blockgranularity, a converted 65B code block stream is mapped to the OPUpayload area according to the Sigma-delta algorithm. Shadowed areas arestuffing areas. The mapping overhead information C_(m) is placed intoOPUflex overhead positions in the first to third rows of the 15^(th) and16^(th) columns.

If mapping is performed based on a 65-byte super block, as shown in FIG.10, the payload area is divided into 234 65-byte blocks (designated asSB). Terminates of the first and third rows are respectively filled with5 padding bytes (designated as FS), and terminates of the second andfourth rows are respectively filled with 6 padding bytes (designated asFS). Based on a 65-byte code block granularity, a converted 65-bytesuper block stream is mapped to the OPUflex payload area according tothe Sigma-delta algorithm. Shadowed areas are stuffing areas. Themapping overhead information C_(m) is placed into OPUflex overheadpositions in the first to third rows of the 15^(th) and 16^(th) columns.

Optionally, expansion may be performed on the basis of an OPU frame. Itis assumed that mapping is performed based on a 65-byte super block. Asshown in FIG. 11, an existing OPU frame structure with four rows and3810 columns is expanded to a structure with four rows and 3837 columns.The overhead area is the four rows of the 15^(th) to 16^(th) columns,and the payload area is the four rows of 3835 columns. The payload areais divided into 236 65-byte super blocks (designated as SB) and no byteneeds to be filled in. Based on a 65-byte super block granularity, aconverted 65-byte super block stream is mapped to the OPUflex payloadarea according to the Sigma-delta algorithm. Shadowed areas are stuffingareas. The mapping overhead information C_(m) is placed into OPUflexoverhead positions in the first to third rows of the 15^(th) and 16^(th)columns.

Optionally, a new ODU frame structure is constructed. The ODU includesan OPU, and includes an overhead area and a payload area. It is assumedthat mapping is performed based on a 65-byte super block. As shown inFIG. 12, 256 super blocks (designated as SB) are included. The overheadarea is one frame header overhead super block (designated as SB-OH), andthe payload area is divided into 255 super blocks. Based on a 65-bytesuper block granularity, a converted 65-byte super block stream ismapped to the OPU payload area according to the Sigma-delta algorithm.Shadowed areas are stuffing areas. The mapping overhead informationC_(m) is placed into an OPU overhead position in the frame headeroverhead code block. As shown in the figure, a frame header overheadcode block pattern includes a frame header indicator FAS (6 bytes), amultiframe indicator MFAS (1 byte), an ODU overhead (42 bytes), an OPUoverhead (8 bytes), and a reserved area (8 bytes).

An embodiment of the present disclosure further provides a dataprocessing method for a receive end. It may be understood that, themethod for the receive end provided in this embodiment of the presentdisclosure is complementary to the foregoing method for a transmit end,and implementation details of the foregoing implementation method areconsistent with or opposite to those in this embodiment of the presentdisclosure. The method in this embodiment of the present disclosureincludes the following steps.

Step S201. Receive an OPU signal.

An OTU signal is received, and then the OPU signal is obtained by meansof demultiplexing.

Step S203: Perform demapping process on the OPU signal.

Optionally, a demapping manner is determined according to a PTindicator, and the demapping is performed using a code block as agranularity and according to a C_(m) value carried in an OPU overhead.

Optionally, the demapping may be performed using a code block as agranularity and according to a preset C_(m) value.

Step S205: Delete an idle code block in a code block stream obtained bymeans of the demapping process, where the idle code block is a controlcode block that includes an idle code block type indicator, and the idlecode block does not carry a packet service.

Step S207: Obtain the packet service from the code block stream fromwhich the idle code block is deleted.

Start and end positions of the packet service may be determinedaccording to an S code block and a T code block in the code blockstream, and the packet service may be obtained according to the startand end positions.

Optionally, performing demapping process on the OPU signal includesperforming the demapping process on the OPU signal according to a presetvalue C_(m), where C_(m) is a quantity of code blocks carried in an OPUframe.

Optionally, the performing demapping process on the OPU signal includesperforming the demapping processing on the OPU signal according to afixed mapping pattern.

Optionally, deleting an idle code block in a code block stream obtainedby means of the demapping processing includes identifying the idle codeblock type indicator, and deleting a code block that includes the idlecode block type indicator.

Optionally, the idle code block further carries at least one of a packetservice port number or a packet service type indicator.

Optionally, performing demapping process on the OPU signal includesdemapping a 65B code block stream from the OPU signal, and converting asynchronization header of each 65B code block from 1 bit to 2 bits toobtain a 64B/66B code block.

An embodiment of the present disclosure further provides acommunications device. The communications device provided in thisembodiment of the present disclosure may be configured to implement theforegoing methods. Implementation details and technical principles ofthe foregoing methods are the same as those of this embodiment of thepresent disclosure, and may be combined with each other.

The communications device in this embodiment of the present disclosureincludes a processing component configured to obtain a code block streamthat carries a packet service, perform rate adaptation on the obtainedcode block stream, and map the rate-adapted code block stream to an OPUsignal.

Optionally, the processing component includes an obtaining unit, a rateadaptation unit, and a mapping unit. The obtaining unit is configured toobtain the code block stream that carries the packet service, the rateadaptation unit is configured to perform the rate adaptation on theobtained code block stream, and the mapping unit is configured to mapthe rate-adapted code block stream to the OPU signal.

Optionally, performing rate adaptation on the obtained code block streamincludes at least one of inserting an idle code block into the obtainedcode block stream, or deleting some or all of idle code blocks in theobtained code block stream, where the idle code block is a control codeblock that includes an idle code block type indicator, and the idle codeblock does not carry the packet service, where a quantity ofto-be-mapped code blocks in the rate-adapted code block stream withineach OPU frame period is equal to a preset value C_(m).

Optionally, mapping the rate-adapted code block stream to an OPU signalincludes mapping C_(m) code blocks to one OPU frame within each OPUframe period according to a fixed mapping pattern, and inserting C_(m)into an overhead of the OPU frame.

Optionally, the obtained code block stream is a 64B/66B code blockstream, and a code block type field of the idle code block is 0x88,where inserting an idle code block into the obtained code block streamincludes inserting an idle code block into a first position of theobtained code block stream, where the first position is any position inthe obtained code block stream.

Optionally, performing rate adaptation on the obtained code block streamincludes deleting some or all of idle code blocks in the obtained codeblock stream, where the idle code block is a control code block thatincludes an idle code block type indicator, and the idle code block doesnot carry the packet service.

Optionally, performing rate adaptation on the obtained code block streamincludes performing code block conversion on the code block stream intowhich an idle code block is inserted or from which an idle code block isdeleted, where the code block conversion includes compressing a 2-bitsynchronization header of each code block into 1 bit, where when the 1bit is filled with 1, it indicates that a corresponding code block is acontrol code block, and when the 1 bit is filled with 0, it indicatesthat a corresponding code block is a data code block.

Optionally, mapping the rate-adapted code block stream to an OPU signalincludes filling 0x1D in a PT indicator field of the OPU signal in orderto indicate that a mapping manner is a manner in which the rate-adaptedcode block stream is directly mapped.

The processing component in this embodiment of the present disclosuremay be one of a digital signal processor (DSP), a field programmablegate array (FPGA), or an application-specific integrated circuit (ASIC).The corresponding obtaining unit, rate adaptation unit, and mapping unitmay be understood as independent or integrated functional modules in theprocessing component.

Optionally, the processing component in this embodiment of the presentdisclosure may include interconnected processors, and one or morememories. The one or more memories are configured to store aninstruction in one aspect, and configured to cache data in anotheraspect. The processor may be configured to execute the instructionstored in the memory. In addition, driven by of the instruction, theprocessor performs a corresponding method in the embodiments of thepresent disclosure in order to implement functions of the communicationsdevice in this embodiment of the present disclosure. The correspondingprocessor may be one of a DSP, an FPGA, or an ASIC. The one or morememory may be one or more of a read-only memory (ROM), a random accessmemory (RAM), a FIFO memory, or may be another storage medium.

Optionally, the communications device provided in this embodiment of thepresent disclosure may further include a receiver and a transmitter. Thereceiver is configured to receive a signal, and the transmitter isconfigured to send a signal. Further, the receiver is configured toreceive an optical signal, and perform optical-to-electrical conversionon the optical signal. Optionally, the receiver may further include ananalog to digital converter configured to perform analog-to-digitalconversion on an electrical signal obtained after theoptical-to-electrical conversion. The transmitter may be a laser.

It may be understood that, all methods in the embodiments of the presentdisclosure may be performed by the communications device provided inthis embodiment of the present disclosure, that is, the communicationsdevice provided in this embodiment of the present disclosure hasfunctions for performing some or all of the foregoing methods. Further,a corresponding function may be implemented by the processing componentin the communications device, and may be implemented by a correspondingrefined functional module in a corresponding processing unit.Alternatively, all the methods provided in the embodiments of thepresent disclosure may be converted into instructions by means ofprogramming or in another manner. The instructions are stored in acorresponding computer readable medium, or fixed in correspondinghardware. When being executed, the instructions may drive a processingunit configured to execute the instructions, to implement the methodsdescribed in the embodiments of the present disclosure.

An embodiment of the present disclosure further provides acommunications device, where the communications device includes aprocessing component configured to receive an OPU signal, performdemapping processing on the OPU signal, delete an idle code block in thecode block stream obtained by means of the demapping process, where theidle code block is a control code block that includes an idle code blocktype indicator, and the idle code block does not carry a packet service,and obtain a packet service from the code block stream from which theidle code block is deleted.

Optionally, the processing component includes a receiving unit, ademapping unit, a deletion unit, and an obtaining unit, where thereceiving unit is configured to receive the OPU signal, the demappingunit is configured to perform the demapping processing on the OPUsignal, the deletion unit is configured to delete the idle code block inthe code block stream obtained by means of the demapping processing, andthe obtaining unit is configured to obtain the packet service from thecode block stream on which the processing of deleting an idle code blockis performed.

Optionally, performing demapping process on the OPU signal includesperforming the demapping process on the OPU signal according to a fixedmapping pattern and a preset value C_(m), where C_(m) is a quantity ofcode blocks carried in an OPU frame.

Optionally, performing demapping process on the OPU signal includesdemapping a 65B code block stream from the OPU signal, and converting asynchronization header of each 65B code block from 1 bit to 2 bits toobtain a 64B/66B code block.

The processing component in this embodiment of the present disclosuremay be one of a DSP, an FPGA, or an ASIC. The corresponding obtainingunit, rate adaptation unit, and mapping unit may be understood asindependent or integrated functional modules in the processingcomponent.

Optionally, the processing component in this embodiment of the presentdisclosure may include interconnected processors, and one or morememories. The one or more memories are configured to store aninstruction in one aspect, and configured to cache data in anotheraspect. The processor may be configured to execute the instructionstored in the memory. In addition, driven by of the instruction, theprocessor performs a corresponding method in the embodiments of thepresent disclosure in order to implement functions of the communicationsdevice in this embodiment of the present disclosure. The correspondingprocessor may be one of a DSP, an FPGA, or an ASIC. The one or morememory may be one or more of a ROM, a RAM, a FIFO memory, or may beanother storage medium.

Optionally, the communications device provided in this embodiment of thepresent disclosure may further include a receiver and a transmitter. Thereceiver is configured to receive a signal, and the transmitter isconfigured to send a signal. Further, the receiver is configured toreceive an optical signal, and perform optical-to-electrical conversionon the optical signal. Optionally, the receiver may further include ananalog to digital converter configured to perform analog-to-digitalconversion on an electrical signal obtained after theoptical-to-electrical conversion. The transmitter may be a laser.

It may be understood that, all methods in the embodiments of the presentdisclosure may be performed by the communications device provided inthis embodiment of the present disclosure, that is, the communicationsdevice provided in this embodiment of the present disclosure hasfunctions for performing some or all of the foregoing methods. Further,a corresponding function may be implemented by the processing componentin the communications device, and further, may be implemented by acorresponding refined functional module in a corresponding processingunit. Alternatively, all the methods provided in the embodiments of thepresent disclosure may be converted into instructions by means ofprogramming or in another manner. The instructions are stored in acorresponding computer readable medium, or fixed in correspondinghardware. When being executed, the instructions may drive a processingunit configured to execute the instructions, to implement the methodsdescribed in the embodiments of the present disclosure.

An embodiment of the present disclosure provides a communicationssystem. The communications system includes a first communications deviceand a second communications device. The first communications device isconfigured to obtain a code block stream that carries a packet service,perform rate adaptation on the obtained code block stream, and map therate-adapted code block stream to an OPU signal, and the secondcommunications device is configured to receive the OPU signal, performdemapping process on the OPU signal, delete an idle code block in thecode block stream obtained by means of the demapping processing, wherethe idle code block is a control code block that includes an idle codeblock type indicator, and the idle code block does not carry the packetservice, and obtain a packet service from the code block stream on whichthe processing of deleting an idle code block is performed.

Optionally, performing rate adaptation on the obtained code block streamincludes at least one of inserting an idle code block into the obtainedcode block stream, or deleting some or all of idle code blocks in theobtained code block stream, where the idle code block is a control codeblock that includes an idle code block type indicator, and the idle codeblock does not carry the packet service, where a quantity ofto-be-mapped code blocks in the rate-adapted code block stream withineach OPU frame period is equal to a preset value C_(m). Mapping therate-adapted code block stream to an OPU signal includes mapping C_(m)code blocks to one OPU frame within each OPU frame period, and insertingC_(m) into an overhead of the OPU frame, and performing demappingprocess on the OPU signal includes performing the demapping process onthe OPU signal according to C_(m).

Optionally, mapping the rate-adapted code block stream to an OPU signalincludes mapping the rate-adapted code block stream to the OPU signalaccording to a fixed mapping pattern, and performing demapping processon the OPU signal includes performing the demapping process on the OPUsignal according to the fixed mapping pattern.

The first communications device in this embodiment of the presentdisclosure may be a transmit end communications device described in theforegoing implementations, and the second communications device in thisembodiment of the present disclosure may be a receive end communicationsdevice described in the foregoing implementations. Specificimplementation details and technical principles of the communicationssystem provided in this embodiment of the present disclosure may beconsistent with the foregoing method implementations and communicationsdevice implementations, and may be combined with each other.

In addition, an embodiment of the present disclosure further provides acomputer readable medium configured to store an instruction. When beingrun by a computer, the instruction drives the computer to executeforegoing various implementations described in the embodiments of thepresent disclosure.

According to a data processing method, a communications device, and acommunications system that are provided in embodiments of the presentdisclosure, in a process of transmitting a packet service, a code blockstream that carries the packet service is first obtained, then, rateadaptation is performed on the obtained code block stream, and finally,the rate-adapted code block stream is mapped to an OPU signal. Comparedwith a conventional mapping manner in which a GFP is used, the dataprocessing method, the communications device, and the communicationssystem that are provided in the embodiments of the present disclosurefeature low processing complexity and/or high bandwidth utilization.

Persons of ordinary skill in the art may understand that all or some ofthe steps of the method embodiments may be implemented by a programinstructing relevant hardware. The program may be stored in a computerreadable storage medium. When the program runs, the steps of the methodembodiments are performed. The foregoing storage medium includes anymedium that can store program code, such as a ROM, a RAM, a magneticdisk, or an optical disc.

Finally, it should be noted that the foregoing embodiments are merelyintended for describing the technical solutions of the presentdisclosure, but not for limiting the present disclosure. Although thepresent disclosure is described in detail with reference to theforegoing embodiments, persons of ordinary skill in the art shouldunderstand that they may still make modifications to the technicalsolutions described in the foregoing embodiments or make equivalentreplacements to some or all technical features thereof, withoutdeparting from the scope of the technical solutions of the embodimentsof the present disclosure.

1. A data processing method, optical transport network (OTN),comprising: obtaining, by an optical device, a code block stream apacket service; performing, by the optical device, rate adaptation onthe obtained code block stream; and mapping, by the optical device, therate-adapted code block stream to an optical channel payload unit (OPU)signal.
 2. The method according to claim 1, wherein performing the rateadaptation on the obtained code block stream comprises at least one ofinserting an idle code block into the obtained code block stream,wherein the idle code block comprises an idle code block type indicator,wherein the idle code block does not carry the packet service, andwherein a quantity of to-be-mapped code blocks in the rate-adapted codeblock stream within each OPU frame period is equal to a preset value(C_(m)).
 3. The method according to claim 1, wherein mapping, therate-adapted code block stream to the OPU signal comprises: mappingC_(m) code blocks to one OPU frame within each OPU frame period; andinserting the C_(m) into an overhead of the corresponding OPU frames,and wherein the C_(m) comprises a quantity of to-be mapped code blocksin the rate-adapted code block stream.
 4. The method according to claim1, wherein mapping, the rate-adapted code block stream to the OPU signalcomprises mapping the rate-adapted code block stream to the OPU signalaccording to a fixed mapping pattern.
 5. The method according to claim2, wherein inserting the idle code block into the obtained code blockstream comprises inserting the idle code block between a T code blockand an S code block that are adjacent in the obtained code block stream,wherein the idle code block further carries at least one of a packetservice port number or a packet service type indicator, wherein the Tcode block indicates a code block comprising a packet service endcharacter, and wherein the S code block indicates a code block a packetservice start character.
 6. The method according to claim 5, wherein theobtained code block stream comprises a sixty-four-bit to sixty-six-bit(64B/66B) code block stream, and wherein a code block type field of theidle code block comprises 0x1e.
 7. The method according to claim 2,wherein the obtained code block stream comprises a sixty-four-bit tosixty-six-bit (64B/66B) code block stream, wherein a code block typefield of the idle code block comprises 0x88, wherein inserting the idlecode block into the obtained code block stream comprises inserting theidle code block into a first position of the obtained code block stream,and wherein the first position comprises any position in the obtainedcode block stream.
 8. (canceled)
 9. The method according to claim 1,wherein performing the rate adaptation on the obtained code block streamcomprises deleting some or all of idle code blocks in the obtained codeblock stream, wherein the idle code block comprises an idle code blocktype indicator, and wherein the idle code block does not carry thepacket service.
 10. The method according to claim 1, wherein performingthe rate adaptation on the obtained code block stream comprisesperforming code block conversion on the code block stream into which anidle code block is inserted, wherein the code block conversion comprisescompressing a two-bit synchronization header of each code block into onebit, wherein a code block comprises a control code block when the onebit is filled with one, and wherein the code block comprises a data codeblock when the one bit is filled with zero.
 11. The method according toclaim 1, wherein mapping the rate-adapted code block stream to the OPUsignal comprises filling a payload type (PT) indicator field of the OPUsignal with 0x1D to indicate that the rate-adapted code block stream isdirectly mapped.
 12. A communications device, comprising: a memorycomprising instructions; and a processor coupled to the memory, whereinthe instructions cause the processor to be configured to: obtain a codeblock stream carrying a packet service; perform rate adaptation on theobtained code block stream; and map the rate-adapted code block streamto an optical channel payload unit (OPU) signal.
 13. The communicationsdevice according to claim 12, wherein when performing the rateadaptation on the obtained code block stream, the instructions furthercause the processor to be configured to insert an idle code block intothe obtained code block stream, wherein the idle code block comprises anidle code block type indicator, wherein the idle code block does notcarry the packet service, and wherein a quantity of to be mapped codeblocks in the rate-adapted code block stream within each OPU frameperiod is equal to a preset value (C_(m)).
 14. The communications deviceaccording to claim 12, wherein when performing the rate adaptation onthe obtained code block stream, the instruction further cause theprocessor to be configured to delete some or all of idle code blocks inthe obtained code block stream, wherein an idle code block comprises anidle code block type indicator, wherein the idle code block does notcarry the packet service, and wherein a quantity of to-be-mapped codeblocks in the rate-adapted code block stream within each OPU frameperiod is equal to a preset value (C_(m)).
 15. The communications deviceaccording to claim 12, wherein when mapping the rate-adapted code blockstream to the OPU signal, the instructions further cause the processorto be configured to: map C_(m) code blocks to one OPU frame within eachOPU frame period according to a fixed mapping pattern; and insert C_(m)into an overhead of the corresponding OPU frame, wherein the C_(m)comprises a quantity of to-be-mapped code blocks in the rate-adaptedcode block stream.
 16. The communications device according to claim 13,wherein the obtained code block stream comprises a sixty-four-bit tosixty-six-bit (64B/66B) code block stream, wherein a code block typefield of the idle code block comprises 0x88, wherein when inserting theidle code block into the obtained code block stream, the instructionsfurther cause the processor to be configured to insert the idle codeblock into a first position of the obtained code block stream, andwherein the first position comprises any position in the obtained codeblock stream.
 17. The communications device according to claim 12,wherein when performing the rate adaptation on the obtained code blockstream, the instructions further cause the processor to be configuredto: delete some or all of idle code blocks in the obtained code blockstream, wherein an idle code block comprises an idle code block typeindicator, and wherein idle code block does not carry the packetservice.
 18. A communications device, comprising: a memory comprisinginstructions; and a processor coupled to the memory, wherein theinstructions cause the processor to be configured to: receive an opticalchannel payload unit (OPU) signal; perform demapping processing on theOPU signal; delete an idle code block in a code block stream obtainedfrom the demapping processing, wherein the idle code block comprises anidle code block type indicator, and wherein the idle code block does notcarry a packet service; and obtain the packet service from the codeblock stream which the idle code block is deleted.
 19. (canceled) 20.The communications device according to claim 18, wherein when performingthe demapping processing on the OPU signal, the instructions furthercause the processor to be configured to perform the demapping processingon the OPU signal according to a fixed mapping pattern and a presetvalue (C_(m)), wherein the C_(m) comprises a quantity of code blockscarried in an OPU frame.
 21. The method according to claim 1, whereinperforming the rate adaptation on the obtained code block streamcomprises deleting some or all of idle code blocks in the obtained codeblock stream, wherein the idle code block comprises an idle code blocktype indicator, wherein the idle code block does not carry the packetservice, and wherein a quantity of to-be-mapped code blocks in therate-adapted code block stream within each OPU frame period is equal toa preset value (C_(m)).
 22. The method according to claim 1, whereinperforming the rate adaptation on the obtained code block streamcomprises performing code block conversion on the code block stream fromwhich an idle code block is deleted, wherein the code block conversioncomprises compressing a two-bit synchronization header of each codeblock into one bit, wherein a code block comprises a control code blockwhen the one bit is filled with one, and wherein the code blockcomprises a data code block when the one bit is filled with zero.